const TOKEN_NAME = 'hkzf_token'

const getToken = () => {
  return localStorage.getItem(TOKEN_NAME)
}

const setToken = (token) => {
  return localStorage.setItem(TOKEN_NAME, token)
}

const delToken = () => {
  return localStorage.removeItem(TOKEN_NAME)
}

const isAuth = () => {
  return !!getToken()
}

export {getToken, setToken, delToken, isAuth}